<template>
	<!-- 查看范本 -->
	<view class="page">
		<image :src="vuex_imgUrl+image" mode="widthFix"></image>
	</view>
</template>

<script>
	export default {
		name: "example",
		data() {
			return {
				image:'',
				type: null // 初始化参数变量
			};
		},
		onLoad(options) {
			// 从options中获取传递的参数
			if (options.param) {
				this.type = options.param; // 将参数赋值给data中的param变量
			}
		},
		onShow() {
			this.getSamples();
		},
		methods: {
			getSamples(){
				this.$api.getSamples({type:this.type}).then(res=>{
						console.log(res,'范本地址')	
						this.image = res.data.image
					})
			}
		}
	};
</script>

<style lang="scss" scoped>
	image {
		width: 100vw;
	}
</style>